Sentence Transformer
Sentence Transformers (a.k.a. SBERT) is the go-to Python module for accessing, using, and training state-of-the-art embedding and reranker models. It can be used to compute embeddings using Sentence Transformer models (quickstart) or to calculate similarity scores using Cross-Encoder (a.k.a. reranker) models (quickstart). This unlocks a wide range of applications, including semantic search, semantic textual similarity, and paraphrase mining.
perplexity.ai.icon
Transformer系(BERTなど)の事前学習済み言語モデルをベースにしており、文や段落の意味をよく捉えた高品質なベクトルを生成できます。 生成されたベクトル同士の距離(コサイン類似度など)を計算することで、「意味が近い文章」を簡単に見つけることができます。
例えば「天気が良い」と「今日は晴れ」のような異なる表現でも、意味が近ければベクトル同士も近くなります。
Pythonライブラリ(sentence-transformers)として提供されており、pipで簡単に導入できます